package com.csproj.basic.service.dto;


import com.csproj.dispatch.service.dto.DispatchDTO;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;

/**
 * A DTO for the ElectronicLock entity.
 */
public class ElectronicLockDTO implements Serializable {

    private String id;

    @NotNull(message = "关锁编号不能为空")
    private String lockNo;

    @NotNull(message = "关锁sim卡号不能为空")
    private String simNum;

    private String siteId;

    private String nowSiteId;

    private String siteName;

    private String state;

    private String stateName;

    public Boolean getHasUsed() {
        return hasUsed;
    }

    public void setHasUsed(Boolean hasUsed) {
        this.hasUsed = hasUsed;
    }

    private Boolean hasUsed;
    private Boolean enableFlag;
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    /**
     * 启用原因
     */
    private String reason;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLockNo() {
        return lockNo;
    }

    public void setLockNo(String lockNo) {
        this.lockNo = lockNo;
    }

    public String getSimNum() {
        return simNum;
    }

    public void setSimNum(String simNum) {
        this.simNum = simNum;
    }

    public String getSiteId() {
        return siteId;
    }

    public String getNowSiteId() {
        return nowSiteId;
    }

    public void setNowSiteId(String nowSiteId) {
        this.nowSiteId = nowSiteId;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public String  getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Boolean isEnableFlag() {
        return enableFlag;
    }

    public void setEnableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
    }

    public Boolean getEnableFlag(){ return  enableFlag; }

    public ElectronicLockMessageDTO getElectronicLockMessageDTO() {
        return electronicLockMessageDTO;
    }

    public void setElectronicLockMessageDTO(ElectronicLockMessageDTO electronicLockMessageDTO) {
        this.electronicLockMessageDTO = electronicLockMessageDTO;
    }

    public  ElectronicLockMessageDTO electronicLockMessageDTO;
    public DispatchDTO dispatchDTO;

    public DispatchDTO getDispatchDTO() {
        return dispatchDTO;
    }

    public void setDispatchDTO(DispatchDTO dispatchDTO) {
        this.dispatchDTO = dispatchDTO;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ElectronicLockDTO electronicLockDTO = (ElectronicLockDTO) o;
        if(electronicLockDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), electronicLockDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "ElectronicLockDTO{" +
            "id=" + getId() +
            ", lockNo='" + getLockNo() + "'" +
            ", simNum='" + getSimNum() + "'" +
            ", siteId='" + getSiteId() + "'" +
            ", state='" + getState() + "'" +
            ", enableFlag='" + isEnableFlag() + "'" +
            "}";
    }

    public String getStateName() {
        return stateName;
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }
}
